package com.qjsp.action.admin;

import javax.annotation.Resource;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.ExceptionMapping;
import org.apache.struts2.convention.annotation.ExceptionMappings;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.Mapping;

import com.opensymphony.xwork2.ActionSupport;
import com.qjsp.doman.User;
import com.qjsp.service.admin.UserService;

@SuppressWarnings("serial")
@Controller
public class LoginAction extends ActionSupport{
 
	@Resource
	private UserService userService;

	public UserService getUserService() {
		return userService;
	}
	
	public void findName(){
		System.out.println(userService.findById("1"));
		
	}  
	 public String selUser(){
		
		userService.insert(new User(3,"admin","123"));
			
		 return SUCCESS;
		 }
	
	
}
